home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Magazine Collection 2001
/
Delphi Magazine Collection 20001 (2001).iso
/
DISKS
/
ISSUE23
/
CLINIC
/
LOCATEU.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-04-27
|
839b
|
42 lines
unit LocateU;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Grids, DBGrids, Db, DBTables;
type
TForm1 = class(TForm)
Table1: TTable;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
EdtCustNo: TEdit;
EdtCompany: TEdit;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
if not Table1.Locate('CustNo;Company',
VarArrayOf([EdtCustNo.Text, EdtCompany.Text]),
[loPartialKey, loCaseInsensitive]) then
raise Exception.Create('Search values not found')
end;
end.